import { createApp } from 'vue'
import { createPinia } from 'pinia'
// 引入自定的图片懒加载插件
import { lazyPlugin } from '@/directives/index'
// 引入全局组件
import commonViews from '@/components/index'
// 引入pinia中持久化存储数据插件 会优先从浏览器的本地存储获取数据
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'
import '@/styles/common.scss'

const app = createApp(App)
const pinia = createPinia()

pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
app.use(commonViews)
app.use(lazyPlugin)
app.mount('#app')
